import java.util.Scanner;

public class J2scanner {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("输入年龄：");
        int age = sc.nextInt();
        System.out.print("输入身高：");
        int height = sc.nextInt();
//        String aa = sc.nextLine();
        sc.nextLine();//空转一下，吸收回车
        System.out.print("输入姓名：");
        String name = sc.nextLine();

        System.out.println("age = " + age);
        System.out.println("name = " + name);
        System.out.println("height = " + height);

        /**
         * nextint nextline连用
         * 32回车
         * age = 32;
         * nextint，不吸收回车
         * nextline吸收回车，并且把回车作为结束标记
         *
         * 两个nextint，吸收一次即可
         *
         *
         *
         */
    }
}

class J2Scanner2{
    public static void main(String[] args) {
        /*
        nextint，连续出现多个，多个数字之间，可以空格隔开
         */
        Scanner sc = new Scanner(System.in);
        System.out.print("输入年龄，身高：");
        int age = sc.nextInt();
        int height = sc.nextInt();
        System.out.println("age = " + age);
        System.out.println("height = " + height);
    }
}
